home *** CD-ROM | disk | FTP | other *** search
/ Windows Expert / Windows Expert.iso / utility / whelp.zip / WHELP.DOC < prev    next >
Text File  |  1992-06-09  |  4KB  |  107 lines

  1.  
  2.  
  3. What is whelp?
  4. --------------
  5.  
  6. whelp is a small program that provides a command line interface to the
  7. winhelp help system in Microsoft Windows. The command line syntax is
  8.  
  9.     whelp [/F helpfile] topic
  10.  
  11. (You can use -f instead of /F if you prefer)
  12.  
  13. This invokes winhelp with a helpfile and searches for the topic. If no
  14. topic matches then winhelp lets you search interactively. If no helpfile
  15. is specified the default is win31wh.hlp (the SDK reference).
  16.  
  17. That's all. Not very useful in itself, but it can be used in conjunction
  18. with other tools to build useful systems.
  19.  
  20.  
  21. How to use whelp
  22. ----------------
  23.  
  24. Since whelp is a windows program it must be run from within windows.
  25. You can either use the "Run" menu item in program manager (or other
  26. applications) or you can use a utility that allows windows programs to
  27. be executed from a DOS prompt.
  28.  
  29. I know of three such utilities (I use run.zip),
  30.  
  31. run.zip        - available from most windows software archives.
  32. wrun.exe    - available with backmenu and backdesk, also in
  33.           most windows archives.
  34. wx.exe        - a utility that comes with Microsoft C/C++ 7.0
  35.  
  36.  
  37. One way to use whelp
  38. --------------------
  39.  
  40. I wrote whelp to use in conjunction with my editor of choice (elvis, a
  41. vi clone) when I am developing windows applications. The following vi
  42. macro allows me to place the cursor over a word (eg a function call or
  43. type) and press ^W to look it up in the SDK reference. It works in a
  44. similar way to ctags, but for the SDK instead of your own code. You
  45. could have a similar macro to invoke Microsoft's qh program (for text
  46. mode help).
  47.  
  48. " invokes winhelp for the word under the cursor
  49. map  ywop^i:! run whelp ^"add@a
  50. " invokes qh for the word under the cursor
  51. map  ywop^i:! qh ^"add@a
  52.  
  53. NOTE:
  54. To enter this in your vi startup file (using vi) you need to enter
  55. the control codes explicitly by escaping them with ^V - that is, you
  56. actually press,
  57.  
  58. map (ctrl-V)(ctrl-W) ywo(ctrl-V)(ESC)p^i:! run whelp (ctrl-V)(ESC)^"add@a
  59.  
  60. There is no reason why whelp should not be used in a similar way with
  61. other editors. I beleive that brief, epsilon and emacs variants will all
  62. allow similar behaviour.
  63.  
  64. Using whelp with elvis
  65. ----------------------
  66.  
  67. If you are using elvis in particular there is the K command to look up a
  68. keyword using a program. This is better than the macro above since the
  69. cursor can be anywhere in the word and there is less rubbish on the
  70. screen. The equivalent mappings for your elvis startup file would be,
  71.  
  72. " invokes winhelp for the word under the cursor
  73. map  :set kp="run whelp"K
  74. " invokes qh for the word under the cursor
  75. map  :set kp=qhK
  76.  
  77. Thanks to Uri London for pointing out the K command in elvis.
  78.  
  79. For the future
  80. --------------
  81.  
  82. whelp is so small there shouldn't be any bugs in it, but if you find any
  83. you can tell me at the address below. I am interested in any other ideas
  84. for using whelp and any improvements you might suggest (or implement).
  85. The distribution contains the C source and a makefile for whelp which
  86. compiles under Windows 3.1 using Microsoft C/C++ 7.0 and the SDK.
  87.  
  88. whelp was written by:
  89.     Mark Dobie,
  90.     Department of Electronics and Computer Science,
  91.     University of Southampton,
  92.     Southampton,
  93.     SO9 5NH
  94.     UK            email: mrd@ecs.soton.ac.uk
  95.  
  96.  
  97. Copyright
  98. ---------
  99.  
  100. whelp is copyright 1992 by Mark Dobie
  101.  
  102. Permission to use, copy, modify, distribute, and sell this software
  103. and its documentation for any purpose is hereby granted without fee,
  104. provided that the above copyright notice appear in all copies and
  105. that both that copyright notice and this permission notice appear
  106. in supporting documentation.
  107.